package information.details;


import javax.swing.JLabel;
import javax.swing.JTextField;

public class VinylDetails extends AbstractDetails{
	
	private static final long serialVersionUID = 1L;

	public VinylDetails(int width) {
		super(width);
		
		this.setTitle("Info om Platen");
		
		this.setupLabelArray();
		this.createTextFieldArray();
	}
	
	public void setArtist(Object data) {
		this.setPrimaryTextAt(0, data);
	}
	
	public void setAlbum(Object data) {
		this.setPrimaryTextAt(1, data);
	}
	
	public void setMusicStyle(Object data) {
		this.setPrimaryTextAt(2, data);
	}
	
	public void setFormat(Object data) {
		this.setPrimaryTextAt(3, data);
	}
	
	public void setLabel(Object data) {
		this.setPrimaryTextAt(4, data);
	}

	@Override
	protected void setupLabelArray() {
		JLabel[] labels = {
			new JLabel("Arist: "),
			new JLabel("Album: "),
			new JLabel("Musikk Stil: "),
			new JLabel("Format: "),
			new JLabel("Label: ")	
		};
		
		this.addLabels(labels);
	}

	@Override
	protected void createTextFieldArray() {
		this.setupTextFields(new JTextField[5]);
	}

	public void populateDetails(Object[][] data) {
		this.setAllPrimaryTexts(data[0]);
	}
}
